/**
 * Title : jFamilyTree
 * Description: jFamilyTree
 * About: Designed and rewritten by Andreas Lundgren, based on the Treebolic application suite
 * Copyright:	(c) 2001-2008
 * Terms of use:see license agreement at http://treebolic.sourceforge.net/en/license.htm
 * Author: Bernard Bou
 * Company: bsys
 */
package jFamilyTree.generator;

import java.awt.Dimension;
import java.util.Map;
import java.util.SortedSet;

import jFamilyTree.Messages;
import jFamilyTree.generator.model.ModelUtils;

/**
 * Mount list dialog
 * 
 * @author Bernard Bou
 */
public class MountListDialog extends ReferenceListDialog
{
	private static final long serialVersionUID = 1L;

	/**
	 * Constructor
	 */
	public MountListDialog(Controller thisController)
	{
		super(thisController);
		setTitle(Messages.getString("MountListDialog.0")); //$NON-NLS-1$
		theLabel.setText(Messages.getString("MountListDialog.1")); //$NON-NLS-1$
		theScrollPane.setPreferredSize(new Dimension(300, 120));
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see jFamilyTree.generator.ReferenceListDialog#update()
	 */
	@Override
	protected void update()
	{
		Map<String, SortedSet<String>> thisMountToLocationMap = ModelUtils.getMountMap(theController.getModel());
		setModel(thisMountToLocationMap);
		super.update();
	}
}
